package com.ld.security.server.admin.modules.ge.po;

import com.ld.security.common.core.base.SuperPo;
import com.ld.security.common.core.util.MapUtil;
import com.ld.security.server.admin.modules.ge.vo.GeTableVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
import java.util.stream.Collectors;

@Data
public class TableInitPo implements SuperPo {

    @ApiModelProperty("数据源")
    private String dataSourceId;


    @ApiModelProperty("表对象")
    private List<GeTableVo> tables;



    public List<String> mapTableNames(){
        if(tables == null){
            return null;
        }
        return tables.stream().map(v -> v.getTableName()).collect(Collectors.toList());
    }

}
